package org.colcon.web.model;

import java.util.HashMap;
import java.util.Map;

public class ColCon extends Agent 
{
	private static final long serialVersionUID = -3946017707999744316L;

	public String getType(){return "colcon";}
	
	public ColCon()
	{
		this(new HashMap<String, String>());
	}
	
	public ColCon(Map<String, String> args)
	{
		this(args.get(PARENT), args.get(ID), args.get(CHILDREN));
	}
	
	public ColCon(String parent, String id, String children)
	{
		super(null, "colcon", children);
	}
	
	public String users()
	{
		return getPath() + '/' + "users";
	}
	
	public String groups()
	{
		return getPath() + '/' + "groups";
	}
	
	public String news()
	{
		return getPath() + '/' + "news";
	}
	
	public String getUserPath(String id)
	{
		return users() + '/' + id;
	}
	
	public String getGroupPath(String id)
	{
		return groups() + '/' + id;
	}
	
	public String user_congress()
	{
		return getGroupPath("user_congress");
	}
	
	public String group_congress()
	{
		return getGroupPath("group_congress");
	}
	
	public String contributor_congress()
	{
		return getGroupPath("contributor_congress");
	}
}
